<%--
  Created by IntelliJ IDEA.
  User: 用户
  Date: 2021/11/18
  Time: 10:05
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<link rel="stylesheet" href="layui/css/layui.css">
<script src="layui/layui.js"></script>
<head>
    <title>login</title>
</head>
<body>
<div style="margin: 0 auto; max-width: 1140px;">
    <div class="layui-row">
        <div class="layui-col-xs4 layui-col-md-offset4">
            <h2 align="center">登录</h2>
            <form class="layui-form" action="/loginServlet" method="post">
                <div class="layui-form-item">
                    <label class="layui-form-label">用户名：</label>
                    <div class="layui-input-block">
                        <input type="text" name="username" lay-verify="title" autocomplete="off" placeholder="请输入用户名"
                               class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">密码：</label>
                    <div class="layui-input-block">
                        <input type="password" name="password" lay-verify="title" autocomplete="off" placeholder="请输入密码"
                               class="layui-input">
                    </div>
                </div>
                <div class="layui-col-xs4 layui-col-md-offset4">
                    <input type="submit" class="layui-btn" value="登录">
                </div>
                <div class="layui-col-xs4 layui-col-md-offset4">
                    <span style="color: red" id="msg">${msg}</span>
                </div>
            </form>
        </div>
    </div>
</div>
<script>
    $ = layui.$;
    $("form").submit(function () {
        $("#msg").html("");
    })
</script>
</body>
</html>
